package com.livew.framework.exception;

/**
 * 业务错误 异常
 * 
 * @ClassName XTBusinessException
 * @author wangdong
 * @Date 2017年10月19日 下午3:10:45
 * @version V1.0
 * @Description
 */
public class XTBusinessException extends Throwable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public XTBusinessException() {

	}

	public XTBusinessException(String message) {
		super(message);
	}

	public XTBusinessException(String code, String message) {
		super(message);
		this.code = code;
	}

	// 错误编码
	protected String code;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Override
	public String toString() {
		return XTBusinessException.class.getSimpleName() + ">>>" + this.getCode() + ":" + this.getMessage();
	}

}
